<%@page import="com.gss.common.util.ApplicationConstants"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
   <%@ include file="../common.jsp" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<script type="text/javascript">
	$(document).ready(function(){
	 setWorkFlowURL('<c:out value="${flowExecutionUrl}" />');
	});
</script>
	<c:choose>
		<c:when test="${fn:length(docdetails) eq 0}">No Documents Expired.</c:when>
	
	<c:otherwise>
	
	<table class="viewDetails">
		<tr class="heading"><td colspan="4">Expired Documents</td></tr>
		<tr class="even">
		<th>Doc Name</th>
		<th>Document Expiry Date</th>
		<th>Document Code</th>
		<th>Renew Document</th>
		</tr>
		<c:forEach items="${docdetails}" var="docdetails" varStatus="loop">
				<c:set var="tabColor" value="even"></c:set>
				    	<c:if test="${(loop.index % 2) eq 0}">
				        	<c:set var="tabColor" value="odd"></c:set>
				        </c:if>
			<tr class="${tabColor}">
				<td>
					<c:out value="${docdetails.docName}"></c:out>
				</td>
				<td>
					<fmt:formatDate value="${docdetails.docValidityEndDate}" pattern="<%=com.gss.common.util.ApplicationConstants.DEFAULT_DATE_PATTERN%>"/>
				</td>
				<td>
					<c:out value="${docdetails.docCode}"></c:out>
				</td>
				<td>
					<input type="button" value="Renew" onclick="javascript:renewDocument('<c:out value="${docdetails.docId}"></c:out>')">
				</td>
			</tr>
		</c:forEach>
	</table>
	</c:otherwise>
</c:choose>